package org.lg.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.lg.entity.Student;
import org.lg.entity.StudentExample;

public interface StudentMapper {
    long countByExample(StudentExample example);

    int deleteByExample(StudentExample example);

    int deleteByPrimaryKey(String sno);

    int insert(Student record);

    int insertSelective(Student record);

    List<Student> selectByExample(StudentExample example);

    //自定义条件查询
    List<Map> genricSelect(String sql);

    //使用mybatis 分页插件 plugins完成分页

    List<Student> getStudentByPage(Map<String,Object> map)throws Exception ;



    List<Student> searchStudent(String condition);

    List<Student> getStudentWithClazz();

    List<Student> getStudentWithScs();

    Student selectByPrimaryKey(String sno);

    List<Student> selectStudentByCno(String cno);

    Student selectByPrimaryKey1(String sno);

    Student selectByPrimaryKeyWithClazz(String sno);
    Student selectByPrimaryKeyWithClazzAndTeacher(String sno);



    Student selectByPrimaryKeyWithClazzAndCourse1(String sno);

    Student selectByPrimaryKeyWithClazzAndCourse2(String sno);

    int updateByExampleSelective(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByExample(@Param("record") Student record, @Param("example") StudentExample example);

    int updateByPrimaryKeySelective(Student record);

    int updateByPrimaryKey(Student record);


}